package backed.repository;

import backed.entity.Order;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface OrderRepository extends JpaRepository<Order, Long> {
    Optional<Order> findByOrderNo(String orderNo);

    List<Order> findByBuyerIdOrderByCreateTimeDesc(Long buyerId);

    List<Order> findBySellerIdOrderByCreateTimeDesc(Long sellerId);
}
